﻿using System;
using FellowshipOne.API.People.Model;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;

namespace FellowshipOne.API.Tests
{
    [TestClass]
    public class PeopleTest : Base
    {
        [TestMethod]
        public void GetById()
        {
            var person = Client.PeopleRealm.People.Get("60590973");

            person.ShouldNotBe(null);
            person.FirstName.ShouldBe("Ruben");
        }

        [TestMethod]
        public void SavePerson()
        {
            Person person = Client.PeopleRealm.People.Get("60590973");

            person.MemberEnvelopeCode = "451bcfc5-57ec-4496-bfe5-a34063bb5340";
            
            Client.PeopleRealm.People.Update(person, person.ID.ToString());
        }
    }
}
